home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_cups.idb / usr / freeware / bin / cups-config.z / cups-config
Text File  |  2002-04-08  |  3KB  |  134 lines

  1. #! /bin/sh
  2. #
  3. # "$Id: cups-config.in,v 1.5 2002/02/12 18:47:10 mike Exp $"
  4. #   CUPS configuration utility.
  5. #
  6. #   Copyright 2001 by Easy Software Products, all rights reserved.
  7. #
  8. #   These coded instructions, statements, and computer programs are the
  9. #   property of Easy Software Products and are protected by Federal
  10. #   copyright law.  Distribution and use rights are outlined in the file
  11. #   "LICENSE.txt" which should have been included with this file.  If this
  12. #   file is missing or damaged please contact Easy Software Products
  13. #   at:
  14. #
  15. #       Attn: CUPS Licensing Information
  16. #       Easy Software Products
  17. #       44141 Airport View Drive, Suite 204
  18. #       Hollywood, Maryland 20636-3111 USA
  19. #
  20. #       Voice: (301) 373-9603
  21. #       EMail: cups-info@cups.org
  22. #         WWW: http://www.cups.org
  23. #
  24.  
  25. VERSION="1.1.14"
  26. APIVERSION="1.1"
  27.  
  28. prefix=${ROOT}/usr/freeware
  29. exec_prefix=${ROOT}/usr/freeware
  30. bindir=${exec_prefix}/bin
  31. includedir=${prefix}/include
  32. libdir=${ROOT}/usr/freeware/${ABILIB-lib32}
  33. datadir=${ROOT}/usr/freeware/share
  34. sysconfdir=${ROOT}/usr/freeware/etc
  35. cups_datadir=/usr/freeware/share/cups
  36. cups_serverbin=/usr/freeware/lib/cups
  37. cups_serverroot=/usr/freeware/etc/cups
  38.  
  39. # flags for C++ compiler:
  40. CFLAGS=""
  41. LDFLAGS=""
  42. LIBS="-lssl -lcrypto  "
  43.  
  44. if test $includedir != /usr/include; then
  45.     CFLAGS="$CFLAGS -I$includedir"
  46. fi
  47.  
  48. if test $libdir != /usr/lib -a $libdir != /usr/lib32; then
  49.     LDFLAGS="$LDFLAGS -L$libdir"
  50. fi
  51.  
  52. usage ()
  53. {
  54.     echo "Usage: cups-config --api-version"
  55.     echo "       cups-config --cflags"
  56.     echo "       cups-config --datadir"
  57.     echo "       cups-config --help"
  58.     echo "       cups-config --ldflags"
  59.     echo "       cups-config [--image] [--static] --libs"
  60.     echo "       cups-config --serverbin"
  61.     echo "       cups-config --serverroot"
  62.     echo "       cups-config --version"
  63.  
  64.     exit $1
  65. }
  66.  
  67. if test $# -eq 0; then
  68.     usage 1
  69. fi
  70.  
  71. # Parse command line options
  72. static=no
  73. image=no
  74.  
  75. while test $# -gt 0; do
  76.     case $1 in
  77.     --api-version)
  78.         echo $APIVERSION
  79.         ;;
  80.     --cflags)
  81.         echo $CFLAGS
  82.         ;;
  83.     --datadir)
  84.         echo $cups_datadir
  85.         ;;
  86.     --help)
  87.         usage 0
  88.         ;;
  89.     --image)
  90.         image=yes
  91.         ;;
  92.     --ldflags)
  93.         echo $LDFLAGS
  94.         ;;
  95.     --libs)
  96.         if test $static = no; then
  97.             if test $image = no; then
  98.                 echo -lcups $LIBS
  99.         else
  100.                 echo -lcupsimage -lcups $LIBS
  101.         fi
  102.         else
  103.             if test $image = no; then
  104.                 echo $libdir/libcups.a $LIBS
  105.         else
  106.                 echo $libdir/libcupsimage.a $libdir/libcups.a $LIBS
  107.         fi
  108.         fi
  109.         ;;
  110.     --serverbin)
  111.         echo $cups_serverbin
  112.         ;;
  113.     --serverroot)
  114.         echo $cups_serverroot
  115.         ;;
  116.     --static)
  117.         static=yes
  118.         ;;
  119.     --version)
  120.         echo $VERSION
  121.         ;;
  122.     *)
  123.         usage 1
  124.         ;;
  125.     esac
  126.  
  127.     shift
  128. done
  129.  
  130. #
  131. # End of "$Id: cups-config.in,v 1.5 2002/02/12 18:47:10 mike Exp $".
  132. #
  133.